
<!-- target:edit -->
<form class="edit-container style-bill order-edit-container grey-bg vertical-arrangement" name="editBookForm" ui="type:m-panel">
    <!-- if:${id} -->
    <input name="id" ui="type:text" class="ui-hide" value="${id}">
    <!-- /if -->

    <div class="blank-24"></div>

    <div class="edit-item" ui="type:mao.ui.InputGroup;label:费用类型;required:true">
        <div class="edit-input placeholder" ui="type:mao.ui.SelectEdit;view:book.costTypeSelect;title:费用类型;items:&{NS.finCostTypeTree};name:costType;value:${detail.costType};text:${costType.name};"></div>
        <span class="edit-icon"></span>
    </div>

    <div class="edit-item" ui="type:mao.ui.InputGroup;label:金额;required:true">
        <div ui="type:Text;" class="edit-text">
            <input type="text" name="costAmount" value="${detail.costAmount}" placeholder="请输入金额" value="" />
        </div>
    </div>
    <div class="edit-item" ui="type:mao.ui.InputGroup;label:消费日期;required:true">

        <div class="edit-input" ui="type:m-calendar;name:costTime;value:${detail.costTime|dateFormat('yyyy-MM-dd')};placeholder:请选择消费日期;regexp:.+">
            <div ui="values:2000-2040;format:{0}年"></div>
            <div ui="values:1-12;format:{0}月"></div>
            <div ui="values:1-31;format:{0}日"></div>
        </div>
        <span class="edit-icon"></span>
    </div>
    <div class="edit-item" ui="type:mao.ui.InputGroup;label:消费城市;required:true">
        <div ui="type:mao.ui.CitySelect;text:${detail.costCityId|parseCity};value:${detail.costCityId}" class="edit-input select-wrap">
            <input type="text" name="costCityId" placeholder="请选择消费城市" value="${detail.costCityId}" class="ui-hide" />
        </div>
        <span class="edit-icon"></span>
    </div>

    <div class="edit-item" ui="type:mao.ui.InputGroup;label:备注;">
        <div ui="type:Text;" class="edit-text">
            <input type="text" name="remark" value="${detail.remark}" placeholder="请输入" value="" />
        </div>
    </div>


    <div class="edit-item invoice" ui="type:mao.ui.InputGroup;">
        <div class="ui-input-label">发票</div>
        <input ui="type:ecui.esr.CreateArray" name="pics" class="ui-hide" />

        <ul ui="type:m-op-list-view" class="invoice-items">
            <!-- var:invoiceInfo = ${detail.invoiceOcrInfoList} || ${NS.invoiceInfo} -->
            <!-- for:${invoiceInfo} as ${item} -->
            <!-- use:invoiceItem(item=${item}) -->
            <!-- /for -->
        </ul>
        <div class="ui-cost-invoice-add ui-button ui-plain ui-button-full" ui="type:mao.ui.PopupButton">
            <div class="label">上传发票</div>
            <ul>
                <li ui="type:mao.ui.CostInvoiceUpload;sourceType:camera">
                    <input name="file" type="file" class="file"/>
                    <div class="icon pdf"></div>
                    <div class="name">拍照</div>
                </li>
                <li ui="type:mao.ui.CostInvoiceUpload;sourceType:album">
                    <input name="file" type="file" class="file"/>
                    <div class="icon photo"></div>
                    <div class="name">上传照片</div>
                </li>
                <li ui="type:mao.ui.CostInvoiceUpload;" class="choose-file">
                    <input name="file" type="file" class="file" accept="pdf/*"/>
                    <div class="icon picture"></div>
                    <div class="name">上传PDF</div>
                </li>
                <li>
                    <div class="icon zfb"></div>
                    <div class="name">支付宝发票</div>
                </li>
            </ul>
        </div>
    </div>


    <div class="blank-24"></div>
</form>

<div class="bottom-box">
    <div class="btn-box">
        <div class="ui-button" ui="type:NS.SaveBookBtn;again;orderId:${detail.id}">再记一笔</div>
        <div class="ui-button ui-button-primary" ui="type:NS.SaveBookBtn;orderId:${detail.id}">保存</div>
    </div>
</div>

<!-- target:costTypeSelect -->
<div class="select-container grey-bg cost-type-select">
    <div class="select-cont" ui="type:tab">
        <!-- for:${items} as ${item} -->

        <div class="select-items">
            <strong>${item.text}</strong>
            <!-- for:${item.children} as ${_item} -->
            <div ui="type:mao.ui.SelectRadio;name:SelectRadio;item:&{_item};value:${_item.id};text:${text};={${value} == ${_item.id} ? 'checked' : ''}" class="select-item" class="active">
                <span>${_item.text}</span>
                <span class="icon"></span>
            </div>
            <!-- /for -->
        </div>
        <!-- /for -->
    </div>
</div>
